import Operator from "./Operator";
import { RC } from "../config/RC";
import MessageBox from "../entities/MessageBox";
import Users from "../entities/User";
import Group from "../entities/Group";
import {USER} from "../config/config";

class GetUserNameByIdOperation extends Operator {
    public async execute(): Promise<RC> {
        const userId = this.args.getProperty('userId');


        const userName = await Users.getName(userId);


        // 将结果设置到 args 中返回
        this.args.setProperty('userName', userName);
        return RC.SUCCESS;
    }
}

export default GetUserNameByIdOperation;
